<?php
function __autoload($classname)
{
	if(strpos($classname, "Zend") === 0)
    {   
        Zend_Loader::loadClass($classname);
    }   
    else
    {   
        $classpath = getClassPath();
        if (isset($classpath[$classname]))
        {   
        	include($classpath[$classname]);
        }   
    }   
}
function getClassPath()
{
    static $classpath=array();
    if (!empty($classpath)) return $classpath;
    $classpath = getClassMapDef();
    return $classpath;
}
function getClassMapDef()
{
    $root = dirname(__FILE__);
    return array(
    	"QFrameDB" => $root . "/db/QFrameDB.php",
    	"QFrameDBExplainResult" => $root . "/db/QFrameDBExplainResult.php",	
		"BaseDB" =>	$root . "/models/BaseDB.php",
		"User" =>	$root . "/models/User.php",
    	"Customer" =>	$root . "/models/Customer.php",
    	"CustomerIndex" =>	$root . "/models/CustomerIndex.php",
    	"Cartridge" =>	$root . "/models/Cartridge.php",
    	"Order" =>	$root . "/models/Order.php",
    	"Machine" =>	$root . "/models/Machine.php",
    	"Express" =>	$root . "/models/Express.php",
	    "Exception" =>	$root . "/libs/Exception.php",
	    "ObjectFinder" =>	$root . "/libs/ObjectFinder.php",
	    "PageUtil" =>	$root . "/libs/PageUtil.php",
    	"Utility" =>	$root . "/libs/Utility.php",
		"Constants"=>	$root . "/libs/Constants.php",
    	"ConfigUtil" => $root . "/libs/ConfigUtil.php",
    );
}
?>